<fix>[backport]: ZSTAC-86784 migrate storage host filters#4589
<fix>[backport]: ZSTAC-86784 migrate storage host filters#4589zstack-robot-2 wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
Warning
|
| Layer / File(s) | Summary |
|---|---|
操作契约与主存储分配 header/.../VmInstanceConstant.java, compute/.../AttachedVolumePrimaryStorageAllocatorFlow.java, compute/.../HostPrimaryStorageAllocatorFlow.java |
新增 MigrateStorage 枚举,并使附加卷及主存储分配流程采用对应的候选筛选路径。 |
主机筛选器接入 plugin/kvm/.../KVMHostAllocatorFilterExtensionPoint.java, plugin/localstorage/.../LocalStorageAllocatorFactory.java |
KVM 属性筛选支持 MigrateStorage,停止状态实例直接保留候选集;本地存储容量筛选支持该操作。 |
Estimated code review effort: 2 (Simple) | ~10 minutes
Sequence Diagram(s)
sequenceDiagram
participant VMOperation
participant PrimaryStorageAllocator
participant KVMFilter
participant LocalStorageFilter
VMOperation->>PrimaryStorageAllocator: MigrateStorage
PrimaryStorageAllocator->>KVMFilter: 筛选候选主机
PrimaryStorageAllocator->>LocalStorageFilter: 筛选本地存储容量
KVMFilter-->>PrimaryStorageAllocator: 返回候选集
LocalStorageFilter-->>PrimaryStorageAllocator: 返回候选集
Poem
小兔挥爪添新枚举,
存储迁移踏上云途。
主机筛选排成队,
停止实例候选留。
胡萝卜庆祝流程通!
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | 标题简洁且准确概括了本次变更的核心:迁移存储主机过滤规则的回移。 |
| Description check | ✅ Passed | 描述明确表明这是 ZSTAC-86784 的回移,与本次变更相关。 |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
sync/shan.wu/fix-5.4.12-ZSTAC-86784-86786@@2
Comment @coderabbitai help to get the list of available commands.
Introduce MigrateVolume host allocation semantics for storage migration so running VMs get KVM host property checks while stopped VMs skip runtime component version filtering. Resolves: ZSTAC-75332 Change-Id: I6c393d7ec962d71fb5437d7a41d0891deb7abae7
262b857 to
ce0f965
Compare
Backport for ZSTAC-86784. Source MR: zstackio/zstack!10312.
sync from gitlab !10559